import pymysql

# 使用参数名连接数据库
conn = pymysql.connect(host='192.168.18.13', port=33046, user='root', password='123456', db='xuweijie', charset='utf8')

# 创建游标
cursor = conn.cursor()

# cursor.execute("show databases")

sql = """create table if not exists movies (id int(10) primary key auto_increment, name varchar(128) not null, pic text, actor varchar(128), score varchar(128), detail_link text)"""

cursor.execute(sql)

cursor.execute("show tables")

print(cursor.fetchall())